﻿ using System;
using System.Collections.Generic;
//using System.Linq;
//using System.Text;

 using ContactManager.Models.Entities;
using NHibernate.Criterion;

namespace ContactManager.Models.Repositories
{
    public interface IContactManagerRepositoryAr
    {
        //CONTACT methods
        //Contact GetContact(System.Guid id);
        //Contact GetContact(int id, bool newCMMDC);

        
        //IEnumerable<Contact> ListContacts();
        
        // List<Contact> FindAllContacts();
        //List<Contact> FindTodayContacts();

        T LoadById<T>(Guid key) where T : class;
        IList<T> ListAll<T>() where T : class;

        void Create<T>(T instance) where T : class;
        //void Edit<T, Y>(T instance, Y fromSession)
        //    where T : class
        //    where Y : class;
        void Edit<T>(T instance)
            where T : class;

        void Delete<T>(T instance) where T : class;

        T GetFirst<T>(ICriterion[] criteria) where T : class;
        IList<T> FindResults<T>(ICriterion[] criteria) where T : class;

        IList<Contact> FindContactsBetweenDates(string field, DateTime date1, DateTime date2);
        IList<Contact> FindContactsBy(char initial, string field);

        ContactGroup GetFirstGroup();

        //IList<T> FindResults<T>(ICriterion[] criteria) where T : class;

        //Contact Add(Guid groupId,Contact ContactToCreate);
        //void EditContact(Contact contactToUpdate);
        //void Delete(Contact contactToDelete);


        //// Group methods

        //ContactGroup EditGroup(ContactGroup groupToUpdate);
        //void DeleteGroup(ContactGroup groupToDelete);
        //ContactGroup CreateGroup(ContactGroup groupToCreate);
        //List<ContactGroup> ListGroups();
        // List<ContactGroup> FindAllGroups();
        //ContactGroup GetFirstGroup();
        //ContactGroup GetGroup(System.Guid id);
        
        
    }
}
